Set list selection?

My appologies if this as been discussed already. I did a couple searches and did not find anything in this topic.

In the code below, I create a dialog box with a list DBE that has a few items in it. According to the DXL docs I should be able to select an item in the list with the set call, but I only get the syntax error: "incorrect arguments for function (set)".

Anyone see what I am doing wrong?

The code:

DB box = create "A Simple List"
string stuff[] = {"a", "b", "c"}
DBE simpleList = list(box, "Select", 150, 5, stuff, 3)
set simpleList, 1
show box


--
Scott


SystemAdmin - Mon Oct 05 10:51:48 EDT 2009

Re: Set list selection?
mwilliamson - Mon Oct 05 10:58:02 EDT 2009

Hi Scott,

Just add brackets in the set statement
 

DB box = create "A Simple List"
string stuff[] = {"a", "b", "c"}
DBE simpleList = list(box, "Select", 150, 5, stuff, 3)
set (simpleList, 1)
show box

 


Mark

 

Re: Set list selection?
Peter_Albert - Mon Oct 05 10:58:39 EDT 2009

Try

set (simpleList, 1)

 


Peter

 

Re: Set list selection?
SystemAdmin - Mon Oct 05 11:14:23 EDT 2009

Thanks guys. I knew it had to be something silly I missed.